//
//  ShopModel.m
//  7.13苏宁框架
//
//  Created by lovena on 15/7/19.
//  Copyright (c) 2015年 lovena. All rights reserved.
//

#import "ShopModel.h"

@implementation ShopModel
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:_icon forKey:@"icon"];
    [aCoder encodeObject:_name forKey:@"name"];
    [aCoder encodeObject:_type forKey:@"type"];
    [aCoder encodeInteger:_count forKey:@"count"];
    [aCoder encodeInt:_flag forKey:@"flag"];
    [aCoder encodeObject:_price forKey:@"price"];
    [aCoder encodeObject:_oldprice forKey:@"oldprice"];
    [aCoder encodeObject:_image forKey:@"image"];
    [aCoder encodeObject:_know forKey:@"know"];
    [aCoder encodeObject:_fuwu forKey:@"fuwu"];
    [aCoder encodeObject:_hpl forKey:@"hpl"];
    [aCoder encodeObject:_person forKey:@"person"];
    [aCoder encodeObject:_pj forKey:@"pj"];
    [aCoder encodeObject:_detailpj forKey:@"detailpj"];
    [aCoder encodeObject:_smallimage forKey:@"smallimage"];
    
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
    self=[super init];
    if (self) {
        self.icon=[aDecoder decodeObjectForKey:@"icon"];
        self.name=[aDecoder decodeObjectForKey:@"name"];
        self.type=[aDecoder decodeObjectForKey:@"type"];
        self.count=[aDecoder decodeIntegerForKey:@"count"];
        self.flag=[aDecoder decodeIntForKey:@"flag"];
        self.price=[aDecoder decodeObjectForKey:@"price"];
        self.oldprice=[aDecoder decodeObjectForKey:@"oldprice"];
        self.image = [aDecoder decodeObjectForKey:@"image"];
        self.know = [aDecoder decodeObjectForKey:@"know"];
        self.fuwu = [aDecoder decodeObjectForKey:@"fuwu"];
        self.hpl = [aDecoder decodeObjectForKey:@"hpl"];
        self.person = [aDecoder decodeObjectForKey:@"person"];
        self.pj = [aDecoder decodeObjectForKey:@"pj"];
        self.detailpj = [aDecoder decodeObjectForKey:@"detailpj"];
        self.smallimage = [aDecoder decodeObjectForKey:@"smallimage"];
    }
    return self;
}
@end
